package com.water_work_form.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.text.SimpleDateFormat;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 基础表——曲线信息——质控样配制信息
 * </p>
 *
 * @author xuke
 * @since 2023-08-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="BasicCurvePreparation对象", description="基础表——曲线信息——质控样配制信息")
public class BasicCurvePreparation implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty(value = "项目")
    private String name;

    @ApiModelProperty(value = "配制日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createDate;

    @ApiModelProperty(value = "有效日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date effectiveDate;

    @ApiModelProperty(value = "配置浓度")
    private String concentration;

    @ApiModelProperty(value = "单元素溶液标准物质编号")
    private String materialNo;

    @ApiModelProperty(value = "单元素溶液标准物质批号")
    private String batchNumber;

    @ApiModelProperty(value = "标准值")
    private String standardValue;

    @ApiModelProperty(value = "波长")
    private Integer wavelength;

    @Override
    public String toString() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String effectiveDateString = sdf.format(effectiveDate);
        String createDateString = sdf.format(createDate);
        return "{\"id\":" + id + ",\"name\":\"" + name + "\",\"createDate\":\"" + createDateString + "\",\"effectiveDate\":\"" + effectiveDateString + "\",\"concentration\":\"" + concentration +
                "\",\"materialNo\":\"" + materialNo + "\",\"batchNumber\":\"" + batchNumber + "\",\"standardValue\":\"" + standardValue + "\",\"wavelength\":\"" + wavelength +"\"}";
    }

}
